package com.njy.decorator;

import java.util.concurrent.atomic.AtomicInteger;

public class test {
    public static void main(String[] args) {
        AtomicInteger at = new AtomicInteger(1);
        for(int i = 0;i < 50;i++){
            new Thread(()->{at.incrementAndGet();}).start();
        }
        try {
            Thread.sleep(1000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        System.out.println("count = " + at.get());
    }
}
